package org.goodsence.gradlespringdemo.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * @author zty
 * @version 0.0.1
 * @apiNote 测试类
 * @user nav1c
 * @date 2023/7/31 17:02
 * @project gradle-spring-demo
 */
@RestController
@RequestMapping("/test")
public class TestController {
    private final Logger logger = LoggerFactory.getLogger(TestController.class);

    @GetMapping("/hello/{name}")
    public ResponseEntity<String> hello(@PathVariable String name){
        logger.debug("name: " + name);
        return ResponseEntity.ok("hello, " + name);
    }
}
